/**
 *
 */
package bancosys.tec.persist.span;

import java.util.ArrayList;
import java.util.List;

import bancosys.tec.persist.Persistable;
import bancosys.tec.persist.validator.AbstractBeanValidator;
import bancosys.tec.persist.validator.ValidationError;

/**
 * @author Guilherme (Bankware Java Team) <b>Created: </b> 02/03/2007
 * @deprecated term structure being currently revised
 */
@Deprecated
public class SpanAwareValidator extends AbstractBeanValidator {

    /**
     * {@inheritDoc}
     * 
     * @see bancosys.tec.persist.validator.AbstractBeanValidator#validateInsert(bancosys.tec.persist.Persistable)
     */
    @Override
    public List<ValidationError> validateInsert(Persistable bean) {
        List<ValidationError> errors = null;
        if (bean instanceof SpanAwareBean) {
            errors = this.addError(errors, this.validateSpanInsert((SpanAwareBean) bean));
        }
        return errors;
    }

    /**
     * {@inheritDoc}
     * 
     * @see bancosys.tec.persist.validator.AbstractBeanValidator#customInsertValidation(bancosys.tec.persist.Persistable)
     */
    @Override
    public List<ValidationError> customInsertValidation(Persistable bean) {
        return new ArrayList<ValidationError>();
    }

    /**
     * {@inheritDoc}
     * 
     * @see bancosys.tec.persist.validator.AbstractBeanValidator#customRemoveValidation(bancosys.tec.persist.Persistable)
     */
    @Override
    public List<ValidationError> customRemoveValidation(Persistable bean) {
        return new ArrayList<ValidationError>();
    }

    /**
     * {@inheritDoc}
     * 
     * @see bancosys.tec.persist.validator.AbstractBeanValidator#customUpdateValidation(bancosys.tec.persist.Persistable)
     */
    @Override
    public List<ValidationError> customUpdateValidation(Persistable bean) {
        return new ArrayList<ValidationError>();
    }
}
